package edu.hgnc.tx.xml.service;

import edu.hgnc.tx.xml.dao.BookDao;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class BookService {

	private static final Log logger = LogFactory.getLog(BookService.class);

	private BookDao bookDao;

	public void checkout(String username, int id) {
		// try {
			bookDao.updateStock(id);
		// }catch (Exception e){
		// 	logger.error("发生了异常");
		// }

		for (int a = 4; a >=0; a--) {
			// System.out.println(10/a);
		}
	}

	public void setBookDao(BookDao bookDao) {
		logger.debug("BookService--使用了set 注入--");
		this.bookDao = bookDao;
	}
}
